{% extends "messages/base.html" %} 

{% load i18n %} 
{% load timezone_filters %}

{% block body %} 
    <h1>{% trans "Sent Messages" %}</h1>
    
    <table class="messages">
        <thead>
            <tr><th>{% trans "Recipient" %}</th><th>{% trans "Subject" %}</th><th>{% trans "Sent" %}</th><th>{% trans "Action" %}</th></tr>
        </thead>
        <tbody>
            {% for message in message_list %} 
                <tr>
                    <td>{{ message.recipient }}</td>
                    <td>
                        <a href="{{ message.get_absolute_url }}">{{ message.subject }}</a>
                    </td>
                    <td>{{ message.sent_at|localtime:user.get_profile.timezone|date:_("DATETIME_FORMAT") }}</td>
                    <td><a href="{% url messages_delete message.id %}?next={% url messages_outbox %}">{% trans "delete" %}</a></td>
                </tr>
            {% endfor %}
        </tbody>
    </table>
{% endblock %}